#ifndef	_SERIALPORT_H
#define _SERIALPORT_H

#include "config.h"

s32 init_RS485_mode(s32 mode);
s32 init_serial(s32 *com_fd, s32 baudrate, s8 *dev_name);
s32 close_serial(s32 *com_fd);
s32 read_serial(s32 com_fd, u8 *data, s32 data_len, s32 block_time);
s32 write_serial(s32 com_fd, const u8 *data, s32 data_len, s32 block_time);
s32 read_comm(s32 com_fd, u8 *data, s32 data_len, s32 block_time);
#endif
